<!DOCTYPE html>
<html>

	<head>
		<meta name="viewport" content="width=device-width" />
		<meta charset="UTF-8"/>
		<title>WebSocket客户端</title>
	</head>

	<body>
		<div>
			<input type="text" id="username" placeholder="请输入用户名"/> <br/>
			<input type="text" id="message"/>
			<input type="button" id="btnConnection" value="连接" onclick="connect()"/>
			<input type="button" id="btnClose" value="关闭" onclick="closeSocket()"/>
			<input type="button" id="btnSend" value="发送" onclick="send()"/>
		</div>
		
	    <script src="websocket.js"></script>
	    <script type="text/javascript">
			connect();
		</script>
	</body>

</html>